<template>
  <div>
    <van-button type="danger" @click="clear">清除所有localStorage</van-button>
    <van-button type="danger" @click="clearTeacher">清除教师localStorage</van-button>
    <van-button type="danger" @click="clearStudent">清除学生localStorage</van-button>
  </div>
</template>

<script>
export default {
  name: 'clear',
  data () {
    return {}
  },
  methods: {
    clear () {
      localStorage.removeItem('token')
      localStorage.removeItem('userInfo')
      localStorage.removeItem('teacher_token')
    },
    clearTeacher () {
      localStorage.removeItem('teacher_token')
      localStorage.removeItem('userInfo')
    },
    clearStudent () {
      localStorage.removeItem('token')
      localStorage.removeItem('userInfo')
    }
  },
  created () {
  }
}
</script>

<style scoped>

</style>
